package com.bjqh.edu.Bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Administrator on 2017/10/20.
 */

public class OpenClass implements Parcelable {


    /**
     * title : 公开课免费啦！！！！
     * msg : success
     * status : 200
     * banner : [{"total":null,"id":31,"time":1508926680000,"flag":6,"page":null,"name":"观看公开课,感受名师风采","img":"/sys/menu/1508921358930.png","rows":null}]
     * rows : [{"uid":null,"typeName":"公共课","id":12,"uName":"王五","title":"事实上","time":1508812047000,"price":3,"grade":"5年级","type":28,"vid":8395148},{"uid":null,"typeName":"公共课","id":13,"uName":"王五","title":"暗示法","time":1508812081000,"price":5,"grade":"7年级","type":28,"vid":8395159},{"uid":null,"typeName":"公共课","id":14,"uName":"王五","title":"打发打发","time":1508812115000,"price":3,"grade":"8年级","type":28,"vid":8395160}]
     */

    private String title;
    private String msg;
    private int status;
    private List<BannerBean> banner;
    private List<RowsBean> rows;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<BannerBean> getBanner() {
        return banner;
    }

    public void setBanner(List<BannerBean> banner) {
        this.banner = banner;
    }

    public List<RowsBean> getRows() {
        return rows;
    }

    public void setRows(List<RowsBean> rows) {
        this.rows = rows;
    }

    public static class BannerBean implements Parcelable {
        /**
         * total : null
         * id : 31
         * time : 1508926680000
         * flag : 6
         * page : null
         * name : 观看公开课,感受名师风采
         * img : /sys/menu/1508921358930.png
         * rows : null
         */

        private String total;
        private int id;
        private long time;
        private int flag;
        private String page;
        private String name;
        private String img;
        private String rows;

        public String getTotal() {
            return total;
        }

        public void setTotal(String total) {
            this.total = total;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public long getTime() {
            return time;
        }

        public void setTime(long time) {
            this.time = time;
        }

        public int getFlag() {
            return flag;
        }

        public void setFlag(int flag) {
            this.flag = flag;
        }

        public String getPage() {
            return page;
        }

        public void setPage(String page) {
            this.page = page;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getImg() {
            return img;
        }

        public void setImg(String img) {
            this.img = img;
        }

        public String getRows() {
            return rows;
        }

        public void setRows(String rows) {
            this.rows = rows;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.total);
            dest.writeInt(this.id);
            dest.writeLong(this.time);
            dest.writeInt(this.flag);
            dest.writeString(this.page);
            dest.writeString(this.name);
            dest.writeString(this.img);
            dest.writeString(this.rows);
        }

        public BannerBean() {
        }

        protected BannerBean(Parcel in) {
            this.total = in.readString();
            this.id = in.readInt();
            this.time = in.readLong();
            this.flag = in.readInt();
            this.page = in.readString();
            this.name = in.readString();
            this.img = in.readString();
            this.rows = in.readString();
        }

        public static final Parcelable.Creator<BannerBean> CREATOR = new Parcelable.Creator<BannerBean>() {
            @Override
            public BannerBean createFromParcel(Parcel source) {
                return new BannerBean(source);
            }

            @Override
            public BannerBean[] newArray(int size) {
                return new BannerBean[size];
            }
        };
    }

    public static class RowsBean implements Parcelable {
        /**
         * uid : null
         * typeName : 公共课
         * id : 12
         * uName : 王五
         * title : 事实上
         * time : 1508812047000
         * price : 3.0
         * grade : 5年级
         * type : 28
         * vid : 8395148
         */

        private String uid;
        private String typeName;
        private int id;
        private String uName;
        private String title;
        private long time;
        private double price;
        private String grade;
        private int type;
        private int vid;

        public String getUid() {
            return uid;
        }

        public void setUid(String uid) {
            this.uid = uid;
        }

        public String getTypeName() {
            return typeName;
        }

        public void setTypeName(String typeName) {
            this.typeName = typeName;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getUName() {
            return uName;
        }

        public void setUName(String uName) {
            this.uName = uName;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public long getTime() {
            return time;
        }

        public void setTime(long time) {
            this.time = time;
        }

        public double getPrice() {
            return price;
        }

        public void setPrice(double price) {
            this.price = price;
        }

        public String getGrade() {
            return grade;
        }

        public void setGrade(String grade) {
            this.grade = grade;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public int getVid() {
            return vid;
        }

        public void setVid(int vid) {
            this.vid = vid;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.uid);
            dest.writeString(this.typeName);
            dest.writeInt(this.id);
            dest.writeString(this.uName);
            dest.writeString(this.title);
            dest.writeLong(this.time);
            dest.writeDouble(this.price);
            dest.writeString(this.grade);
            dest.writeInt(this.type);
            dest.writeInt(this.vid);
        }

        public RowsBean() {
        }

        protected RowsBean(Parcel in) {
            this.uid = in.readString();
            this.typeName = in.readString();
            this.id = in.readInt();
            this.uName = in.readString();
            this.title = in.readString();
            this.time = in.readLong();
            this.price = in.readDouble();
            this.grade = in.readString();
            this.type = in.readInt();
            this.vid = in.readInt();
        }

        public static final Parcelable.Creator<RowsBean> CREATOR = new Parcelable.Creator<RowsBean>() {
            @Override
            public RowsBean createFromParcel(Parcel source) {
                return new RowsBean(source);
            }

            @Override
            public RowsBean[] newArray(int size) {
                return new RowsBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.title);
        dest.writeString(this.msg);
        dest.writeInt(this.status);
        dest.writeTypedList(this.banner);
        dest.writeTypedList(this.rows);
    }

    public OpenClass() {
    }

    protected OpenClass(Parcel in) {
        this.title = in.readString();
        this.msg = in.readString();
        this.status = in.readInt();
        this.banner = in.createTypedArrayList(BannerBean.CREATOR);
        this.rows = in.createTypedArrayList(RowsBean.CREATOR);
    }

    public static final Parcelable.Creator<OpenClass> CREATOR = new Parcelable.Creator<OpenClass>() {
        @Override
        public OpenClass createFromParcel(Parcel source) {
            return new OpenClass(source);
        }

        @Override
        public OpenClass[] newArray(int size) {
            return new OpenClass[size];
        }
    };
}
